package com.future.service;

import com.future.domain.Result;
import com.github.pagehelper.PageInfo;
import com.future.domain.DTO.CommentDTO;


public interface CommentService {
    /**
     * 查询用户收到的评论数
     * @param userId 用户ID
     * @return 收到的评论数
     */
    Result getTotalCommentsReceived(Long userId);
    Result addComment(CommentDTO commentDTO);

    Result deleteComment(Long commentId);

    Result getCommentsByArticle(Long articleId, int pageNum, int pageSize);

    Result getChildComments(Long parentId, int pageNum, int pageSize,Long targetTypeId);

    Result getCommentsByTarget(Long targetId, Integer targetType, int pageNum, int pageSize);

    /**
     * 分页查询顶级评论
     * @param targetId 目标ID
     * @param targetType 目标类型
     * @param pageNum 页码
     * @param pageSize 每页数量
     * @return 顶级评论分页结果
     */
    Result getTopLevelComments(Long targetId, Integer targetType, int pageNum, int pageSize);

}